$(document).ready(function() {
	showFleetData = function() {
		regexp = RegExp(/([\w\d\.\@\-]+)/);
		planet_name = regexp.exec($(this).html())[0];
		$.ajax({
     	type:"GET",
    	    url:"/planet/getfleetinfo/" + planet_name,
    	    success:function(planet_message){
    	    	$("#report").empty();
    	    	$("#report").prepend(planet_message);
    	    	$('html, body').animate({
                    scrollTop: $("#report").offset().top
                }, 100);
    	    }
    	});
	};
	$('span.safe').click(showFleetData);
	$('span.covered').click(showFleetData);
	$('span.notcovered').click(showFleetData);
	$('span.retake').click(showFleetData);
	$('span.retakedict').click(showFleetData);
	$('span.hyp').click(showFleetData);
});